#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.61)
AC_INIT(ng, 0.7.1)
AC_CONFIG_SRCDIR([src/c/ng.c])
#AC_CONFIG_HEADER([config.h])

# Checks for programs.
AC_PROG_CC
AC_PROG_CC_C99

# Checks for libraries.
# FIXME: Replace `main' with a function in `-lnsl':
AC_CHECK_LIB([nsl], [gethostbyname])
# FIXME: Replace `main' with a function in `-lsocket':
AC_CHECK_LIB([socket], [send])
# FIXME: Replace `main' with a function in `-lwsock32':
AC_CHECK_LIB([wsock32], [WriteFile])

# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([arpa/inet.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h unistd.h])

# Checks for typedefs, structures, and compiler characteristics.

# Checks for library functions.
AC_FUNC_SELECT_ARGTYPES
AC_CHECK_FUNCS([getcwd gethostbyname memset select socket strcasecmp strrchr])

AC_CONFIG_FILES([Makefile])
AC_OUTPUT
